package cn.ibizlab.odoo.service.odoo_base.dto;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.odoo.core.odoo_base.valuerule.anno.res_currency.*;
import cn.ibizlab.odoo.core.odoo_base.domain.Res_currency;
import org.springframework.cglib.beans.BeanCopier;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 服务DTO对象[Res_currencyDTO]
 */
public class Res_currencyDTO implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 属性 [CREATE_DATE]
     *
     */
    @Res_currencyCreate_dateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp create_date;

    @JsonIgnore
    private boolean create_dateDirtyFlag;

    /**
     * 属性 [DECIMAL_PLACES]
     *
     */
    @Res_currencyDecimal_placesDefault(info = "默认规则")
    private Integer decimal_places;

    @JsonIgnore
    private boolean decimal_placesDirtyFlag;

    /**
     * 属性 [NAME]
     *
     */
    @Res_currencyNameDefault(info = "默认规则")
    private String name;

    @JsonIgnore
    private boolean nameDirtyFlag;

    /**
     * 属性 [CURRENCY_UNIT_LABEL]
     *
     */
    @Res_currencyCurrency_unit_labelDefault(info = "默认规则")
    private String currency_unit_label;

    @JsonIgnore
    private boolean currency_unit_labelDirtyFlag;

    /**
     * 属性 [ROUNDING]
     *
     */
    @Res_currencyRoundingDefault(info = "默认规则")
    private Double rounding;

    @JsonIgnore
    private boolean roundingDirtyFlag;

    /**
     * 属性 [__LAST_UPDATE]
     *
     */
    @Res_currency__last_updateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp __last_update;

    @JsonIgnore
    private boolean __last_updateDirtyFlag;

    /**
     * 属性 [ID]
     *
     */
    @Res_currencyIdDefault(info = "默认规则")
    private Integer id;

    @JsonIgnore
    private boolean idDirtyFlag;

    /**
     * 属性 [WRITE_DATE]
     *
     */
    @Res_currencyWrite_dateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp write_date;

    @JsonIgnore
    private boolean write_dateDirtyFlag;

    /**
     * 属性 [DATE]
     *
     */
    @Res_currencyDateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    private Timestamp date;

    @JsonIgnore
    private boolean dateDirtyFlag;

    /**
     * 属性 [POSITION]
     *
     */
    @Res_currencyPositionDefault(info = "默认规则")
    private String position;

    @JsonIgnore
    private boolean positionDirtyFlag;

    /**
     * 属性 [DISPLAY_NAME]
     *
     */
    @Res_currencyDisplay_nameDefault(info = "默认规则")
    private String display_name;

    @JsonIgnore
    private boolean display_nameDirtyFlag;

    /**
     * 属性 [ACTIVE]
     *
     */
    @Res_currencyActiveDefault(info = "默认规则")
    private String active;

    @JsonIgnore
    private boolean activeDirtyFlag;

    /**
     * 属性 [RATE]
     *
     */
    @Res_currencyRateDefault(info = "默认规则")
    private Double rate;

    @JsonIgnore
    private boolean rateDirtyFlag;

    /**
     * 属性 [RATE_IDS]
     *
     */
    @Res_currencyRate_idsDefault(info = "默认规则")
    private String rate_ids;

    @JsonIgnore
    private boolean rate_idsDirtyFlag;

    /**
     * 属性 [SYMBOL]
     *
     */
    @Res_currencySymbolDefault(info = "默认规则")
    private String symbol;

    @JsonIgnore
    private boolean symbolDirtyFlag;

    /**
     * 属性 [CURRENCY_SUBUNIT_LABEL]
     *
     */
    @Res_currencyCurrency_subunit_labelDefault(info = "默认规则")
    private String currency_subunit_label;

    @JsonIgnore
    private boolean currency_subunit_labelDirtyFlag;

    /**
     * 属性 [WRITE_UID_TEXT]
     *
     */
    @Res_currencyWrite_uid_textDefault(info = "默认规则")
    private String write_uid_text;

    @JsonIgnore
    private boolean write_uid_textDirtyFlag;

    /**
     * 属性 [CREATE_UID_TEXT]
     *
     */
    @Res_currencyCreate_uid_textDefault(info = "默认规则")
    private String create_uid_text;

    @JsonIgnore
    private boolean create_uid_textDirtyFlag;

    /**
     * 属性 [WRITE_UID]
     *
     */
    @Res_currencyWrite_uidDefault(info = "默认规则")
    private Integer write_uid;

    @JsonIgnore
    private boolean write_uidDirtyFlag;

    /**
     * 属性 [CREATE_UID]
     *
     */
    @Res_currencyCreate_uidDefault(info = "默认规则")
    private Integer create_uid;

    @JsonIgnore
    private boolean create_uidDirtyFlag;


    /**
     * 获取 [CREATE_DATE]
     */
    @JsonProperty("create_date")
    public Timestamp getCreate_date(){
        return create_date ;
    }

    /**
     * 设置 [CREATE_DATE]
     */
    @JsonProperty("create_date")
    public void setCreate_date(Timestamp  create_date){
        this.create_date = create_date ;
        this.create_dateDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_DATE]脏标记
     */
    @JsonIgnore
    public boolean getCreate_dateDirtyFlag(){
        return create_dateDirtyFlag ;
    }

    /**
     * 获取 [DECIMAL_PLACES]
     */
    @JsonProperty("decimal_places")
    public Integer getDecimal_places(){
        return decimal_places ;
    }

    /**
     * 设置 [DECIMAL_PLACES]
     */
    @JsonProperty("decimal_places")
    public void setDecimal_places(Integer  decimal_places){
        this.decimal_places = decimal_places ;
        this.decimal_placesDirtyFlag = true ;
    }

    /**
     * 获取 [DECIMAL_PLACES]脏标记
     */
    @JsonIgnore
    public boolean getDecimal_placesDirtyFlag(){
        return decimal_placesDirtyFlag ;
    }

    /**
     * 获取 [NAME]
     */
    @JsonProperty("name")
    public String getName(){
        return name ;
    }

    /**
     * 设置 [NAME]
     */
    @JsonProperty("name")
    public void setName(String  name){
        this.name = name ;
        this.nameDirtyFlag = true ;
    }

    /**
     * 获取 [NAME]脏标记
     */
    @JsonIgnore
    public boolean getNameDirtyFlag(){
        return nameDirtyFlag ;
    }

    /**
     * 获取 [CURRENCY_UNIT_LABEL]
     */
    @JsonProperty("currency_unit_label")
    public String getCurrency_unit_label(){
        return currency_unit_label ;
    }

    /**
     * 设置 [CURRENCY_UNIT_LABEL]
     */
    @JsonProperty("currency_unit_label")
    public void setCurrency_unit_label(String  currency_unit_label){
        this.currency_unit_label = currency_unit_label ;
        this.currency_unit_labelDirtyFlag = true ;
    }

    /**
     * 获取 [CURRENCY_UNIT_LABEL]脏标记
     */
    @JsonIgnore
    public boolean getCurrency_unit_labelDirtyFlag(){
        return currency_unit_labelDirtyFlag ;
    }

    /**
     * 获取 [ROUNDING]
     */
    @JsonProperty("rounding")
    public Double getRounding(){
        return rounding ;
    }

    /**
     * 设置 [ROUNDING]
     */
    @JsonProperty("rounding")
    public void setRounding(Double  rounding){
        this.rounding = rounding ;
        this.roundingDirtyFlag = true ;
    }

    /**
     * 获取 [ROUNDING]脏标记
     */
    @JsonIgnore
    public boolean getRoundingDirtyFlag(){
        return roundingDirtyFlag ;
    }

    /**
     * 获取 [__LAST_UPDATE]
     */
    @JsonProperty("__last_update")
    public Timestamp get__last_update(){
        return __last_update ;
    }

    /**
     * 设置 [__LAST_UPDATE]
     */
    @JsonProperty("__last_update")
    public void set__last_update(Timestamp  __last_update){
        this.__last_update = __last_update ;
        this.__last_updateDirtyFlag = true ;
    }

    /**
     * 获取 [__LAST_UPDATE]脏标记
     */
    @JsonIgnore
    public boolean get__last_updateDirtyFlag(){
        return __last_updateDirtyFlag ;
    }

    /**
     * 获取 [ID]
     */
    @JsonProperty("id")
    public Integer getId(){
        return id ;
    }

    /**
     * 设置 [ID]
     */
    @JsonProperty("id")
    public void setId(Integer  id){
        this.id = id ;
        this.idDirtyFlag = true ;
    }

    /**
     * 获取 [ID]脏标记
     */
    @JsonIgnore
    public boolean getIdDirtyFlag(){
        return idDirtyFlag ;
    }

    /**
     * 获取 [WRITE_DATE]
     */
    @JsonProperty("write_date")
    public Timestamp getWrite_date(){
        return write_date ;
    }

    /**
     * 设置 [WRITE_DATE]
     */
    @JsonProperty("write_date")
    public void setWrite_date(Timestamp  write_date){
        this.write_date = write_date ;
        this.write_dateDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_DATE]脏标记
     */
    @JsonIgnore
    public boolean getWrite_dateDirtyFlag(){
        return write_dateDirtyFlag ;
    }

    /**
     * 获取 [DATE]
     */
    @JsonProperty("date")
    public Timestamp getDate(){
        return date ;
    }

    /**
     * 设置 [DATE]
     */
    @JsonProperty("date")
    public void setDate(Timestamp  date){
        this.date = date ;
        this.dateDirtyFlag = true ;
    }

    /**
     * 获取 [DATE]脏标记
     */
    @JsonIgnore
    public boolean getDateDirtyFlag(){
        return dateDirtyFlag ;
    }

    /**
     * 获取 [POSITION]
     */
    @JsonProperty("position")
    public String getPosition(){
        return position ;
    }

    /**
     * 设置 [POSITION]
     */
    @JsonProperty("position")
    public void setPosition(String  position){
        this.position = position ;
        this.positionDirtyFlag = true ;
    }

    /**
     * 获取 [POSITION]脏标记
     */
    @JsonIgnore
    public boolean getPositionDirtyFlag(){
        return positionDirtyFlag ;
    }

    /**
     * 获取 [DISPLAY_NAME]
     */
    @JsonProperty("display_name")
    public String getDisplay_name(){
        return display_name ;
    }

    /**
     * 设置 [DISPLAY_NAME]
     */
    @JsonProperty("display_name")
    public void setDisplay_name(String  display_name){
        this.display_name = display_name ;
        this.display_nameDirtyFlag = true ;
    }

    /**
     * 获取 [DISPLAY_NAME]脏标记
     */
    @JsonIgnore
    public boolean getDisplay_nameDirtyFlag(){
        return display_nameDirtyFlag ;
    }

    /**
     * 获取 [ACTIVE]
     */
    @JsonProperty("active")
    public String getActive(){
        return active ;
    }

    /**
     * 设置 [ACTIVE]
     */
    @JsonProperty("active")
    public void setActive(String  active){
        this.active = active ;
        this.activeDirtyFlag = true ;
    }

    /**
     * 获取 [ACTIVE]脏标记
     */
    @JsonIgnore
    public boolean getActiveDirtyFlag(){
        return activeDirtyFlag ;
    }

    /**
     * 获取 [RATE]
     */
    @JsonProperty("rate")
    public Double getRate(){
        return rate ;
    }

    /**
     * 设置 [RATE]
     */
    @JsonProperty("rate")
    public void setRate(Double  rate){
        this.rate = rate ;
        this.rateDirtyFlag = true ;
    }

    /**
     * 获取 [RATE]脏标记
     */
    @JsonIgnore
    public boolean getRateDirtyFlag(){
        return rateDirtyFlag ;
    }

    /**
     * 获取 [RATE_IDS]
     */
    @JsonProperty("rate_ids")
    public String getRate_ids(){
        return rate_ids ;
    }

    /**
     * 设置 [RATE_IDS]
     */
    @JsonProperty("rate_ids")
    public void setRate_ids(String  rate_ids){
        this.rate_ids = rate_ids ;
        this.rate_idsDirtyFlag = true ;
    }

    /**
     * 获取 [RATE_IDS]脏标记
     */
    @JsonIgnore
    public boolean getRate_idsDirtyFlag(){
        return rate_idsDirtyFlag ;
    }

    /**
     * 获取 [SYMBOL]
     */
    @JsonProperty("symbol")
    public String getSymbol(){
        return symbol ;
    }

    /**
     * 设置 [SYMBOL]
     */
    @JsonProperty("symbol")
    public void setSymbol(String  symbol){
        this.symbol = symbol ;
        this.symbolDirtyFlag = true ;
    }

    /**
     * 获取 [SYMBOL]脏标记
     */
    @JsonIgnore
    public boolean getSymbolDirtyFlag(){
        return symbolDirtyFlag ;
    }

    /**
     * 获取 [CURRENCY_SUBUNIT_LABEL]
     */
    @JsonProperty("currency_subunit_label")
    public String getCurrency_subunit_label(){
        return currency_subunit_label ;
    }

    /**
     * 设置 [CURRENCY_SUBUNIT_LABEL]
     */
    @JsonProperty("currency_subunit_label")
    public void setCurrency_subunit_label(String  currency_subunit_label){
        this.currency_subunit_label = currency_subunit_label ;
        this.currency_subunit_labelDirtyFlag = true ;
    }

    /**
     * 获取 [CURRENCY_SUBUNIT_LABEL]脏标记
     */
    @JsonIgnore
    public boolean getCurrency_subunit_labelDirtyFlag(){
        return currency_subunit_labelDirtyFlag ;
    }

    /**
     * 获取 [WRITE_UID_TEXT]
     */
    @JsonProperty("write_uid_text")
    public String getWrite_uid_text(){
        return write_uid_text ;
    }

    /**
     * 设置 [WRITE_UID_TEXT]
     */
    @JsonProperty("write_uid_text")
    public void setWrite_uid_text(String  write_uid_text){
        this.write_uid_text = write_uid_text ;
        this.write_uid_textDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_UID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getWrite_uid_textDirtyFlag(){
        return write_uid_textDirtyFlag ;
    }

    /**
     * 获取 [CREATE_UID_TEXT]
     */
    @JsonProperty("create_uid_text")
    public String getCreate_uid_text(){
        return create_uid_text ;
    }

    /**
     * 设置 [CREATE_UID_TEXT]
     */
    @JsonProperty("create_uid_text")
    public void setCreate_uid_text(String  create_uid_text){
        this.create_uid_text = create_uid_text ;
        this.create_uid_textDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_UID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getCreate_uid_textDirtyFlag(){
        return create_uid_textDirtyFlag ;
    }

    /**
     * 获取 [WRITE_UID]
     */
    @JsonProperty("write_uid")
    public Integer getWrite_uid(){
        return write_uid ;
    }

    /**
     * 设置 [WRITE_UID]
     */
    @JsonProperty("write_uid")
    public void setWrite_uid(Integer  write_uid){
        this.write_uid = write_uid ;
        this.write_uidDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_UID]脏标记
     */
    @JsonIgnore
    public boolean getWrite_uidDirtyFlag(){
        return write_uidDirtyFlag ;
    }

    /**
     * 获取 [CREATE_UID]
     */
    @JsonProperty("create_uid")
    public Integer getCreate_uid(){
        return create_uid ;
    }

    /**
     * 设置 [CREATE_UID]
     */
    @JsonProperty("create_uid")
    public void setCreate_uid(Integer  create_uid){
        this.create_uid = create_uid ;
        this.create_uidDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_UID]脏标记
     */
    @JsonIgnore
    public boolean getCreate_uidDirtyFlag(){
        return create_uidDirtyFlag ;
    }



    public Res_currency toDO() {
        Res_currency srfdomain = new Res_currency();
        if(getCreate_dateDirtyFlag())
            srfdomain.setCreate_date(create_date);
        if(getDecimal_placesDirtyFlag())
            srfdomain.setDecimal_places(decimal_places);
        if(getNameDirtyFlag())
            srfdomain.setName(name);
        if(getCurrency_unit_labelDirtyFlag())
            srfdomain.setCurrency_unit_label(currency_unit_label);
        if(getRoundingDirtyFlag())
            srfdomain.setRounding(rounding);
        if(get__last_updateDirtyFlag())
            srfdomain.set__last_update(__last_update);
        if(getIdDirtyFlag())
            srfdomain.setId(id);
        if(getWrite_dateDirtyFlag())
            srfdomain.setWrite_date(write_date);
        if(getDateDirtyFlag())
            srfdomain.setDate(date);
        if(getPositionDirtyFlag())
            srfdomain.setPosition(position);
        if(getDisplay_nameDirtyFlag())
            srfdomain.setDisplay_name(display_name);
        if(getActiveDirtyFlag())
            srfdomain.setActive(active);
        if(getRateDirtyFlag())
            srfdomain.setRate(rate);
        if(getRate_idsDirtyFlag())
            srfdomain.setRate_ids(rate_ids);
        if(getSymbolDirtyFlag())
            srfdomain.setSymbol(symbol);
        if(getCurrency_subunit_labelDirtyFlag())
            srfdomain.setCurrency_subunit_label(currency_subunit_label);
        if(getWrite_uid_textDirtyFlag())
            srfdomain.setWrite_uid_text(write_uid_text);
        if(getCreate_uid_textDirtyFlag())
            srfdomain.setCreate_uid_text(create_uid_text);
        if(getWrite_uidDirtyFlag())
            srfdomain.setWrite_uid(write_uid);
        if(getCreate_uidDirtyFlag())
            srfdomain.setCreate_uid(create_uid);

        return srfdomain;
    }

    public void fromDO(Res_currency srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getCreate_dateDirtyFlag())
            this.setCreate_date(srfdomain.getCreate_date());
        if(srfdomain.getDecimal_placesDirtyFlag())
            this.setDecimal_places(srfdomain.getDecimal_places());
        if(srfdomain.getNameDirtyFlag())
            this.setName(srfdomain.getName());
        if(srfdomain.getCurrency_unit_labelDirtyFlag())
            this.setCurrency_unit_label(srfdomain.getCurrency_unit_label());
        if(srfdomain.getRoundingDirtyFlag())
            this.setRounding(srfdomain.getRounding());
        if(srfdomain.get__last_updateDirtyFlag())
            this.set__last_update(srfdomain.get__last_update());
        if(srfdomain.getIdDirtyFlag())
            this.setId(srfdomain.getId());
        if(srfdomain.getWrite_dateDirtyFlag())
            this.setWrite_date(srfdomain.getWrite_date());
        if(srfdomain.getDateDirtyFlag())
            this.setDate(srfdomain.getDate());
        if(srfdomain.getPositionDirtyFlag())
            this.setPosition(srfdomain.getPosition());
        if(srfdomain.getDisplay_nameDirtyFlag())
            this.setDisplay_name(srfdomain.getDisplay_name());
        if(srfdomain.getActiveDirtyFlag())
            this.setActive(srfdomain.getActive());
        if(srfdomain.getRateDirtyFlag())
            this.setRate(srfdomain.getRate());
        if(srfdomain.getRate_idsDirtyFlag())
            this.setRate_ids(srfdomain.getRate_ids());
        if(srfdomain.getSymbolDirtyFlag())
            this.setSymbol(srfdomain.getSymbol());
        if(srfdomain.getCurrency_subunit_labelDirtyFlag())
            this.setCurrency_subunit_label(srfdomain.getCurrency_subunit_label());
        if(srfdomain.getWrite_uid_textDirtyFlag())
            this.setWrite_uid_text(srfdomain.getWrite_uid_text());
        if(srfdomain.getCreate_uid_textDirtyFlag())
            this.setCreate_uid_text(srfdomain.getCreate_uid_text());
        if(srfdomain.getWrite_uidDirtyFlag())
            this.setWrite_uid(srfdomain.getWrite_uid());
        if(srfdomain.getCreate_uidDirtyFlag())
            this.setCreate_uid(srfdomain.getCreate_uid());

    }

    public List<Res_currencyDTO> fromDOPage(List<Res_currency> poPage)   {
        if(poPage == null)
            return null;
        List<Res_currencyDTO> dtos=new ArrayList<Res_currencyDTO>();
        for(Res_currency domain : poPage) {
            Res_currencyDTO dto = new Res_currencyDTO();
            dto.fromDO(domain);
            dtos.add(dto);
        }
        return dtos;
    }
}

